/** 常用组件 路由 **/

import Layout from '@/layout'
import Blank from '@/components/Blank'
/* 定义component */
const QInput = () => import('@/views/demo/QInput')
const QButton = () => import('@/views/demo/QButton')
const QTimerBtn = () => import('@/views/demo/QTimerBtn')
const QDatePicker = () => import('@/views/demo/QDatePicker')
const QDialog = () => import('@/views/demo/QDialog')
const QDetail = () => import('@/views/demo/QDetail')
const QSelect = () => import('@/views/demo/QSelect')
const QSelectTable = () => import('@/views/demo/QSelectTable')
const QStepWizard = () => import('@/views/demo/QStepWizard')
const IsShowFirstColumn = () => import('@/views/demo/QSelectTable/isShowFirstColumn.vue')
const Multiple = () => import('@/views/demo/QSelectTable/multiple.vue')
const MultiplePagination = () => import('@/views/demo/QSelectTable/showPagination.vue')
const RadioPagination = () => import('@/views/demo/QSelectTable/radioPagination.vue')

const commonRouter = {
  path: '/common',
  component: Layout,
  redirect: '/common/q-input',
  name: '常用组件',
  meta: {
    title: '常用组件',
    icon: 'job'
  },
  children: [
    {
      path: 'q-input',
      name: 'Input 组件',
      component: QInput,
      meta: { title: 'Input 组件' }
    },
    {
      path: 'q-button',
      name: 'button组件',
      component: QButton,
      meta: { title: 'button组件' }
    },
    {
      path: 'q-timer-btn',
      name: '倒计时组件',
      component: QTimerBtn,
      meta: { title: '倒计时组件' }
    },
    {
      path: 'q-date-picker',
      name: '日期组件',
      component: QDatePicker,
      meta: { title: '日期组件' }
    },
    {
      path: 'q-step-wizard',
      name: '步骤组件',
      component: QStepWizard,
      meta: { title: '步骤组件' }
    },
    {
      path: 'q-dialog',
      name: '弹窗组件',
      component: QDialog,
      meta: { title: '弹窗组件' }
    },
    {
      path: 'q-detail',
      name: '详情组件',
      component: QDetail,
      meta: { title: '详情组件' }
    },
    {
      path: 'q-select',
      name: 'Select下拉组件',
      component: QSelect,
      meta: { title: 'Select下拉组件' }
    },
    {
      path: 'q-select-table',
      name: 'Select下拉表格组件',
      component: Blank,
      meta: { title: 'Select下拉表格组件' },
      children: [
        {
          path: 'index',
          name: '单选',
          component: QSelectTable,
          meta: { title: '单选' }
        },
        {
          path: 'is-show-col',
          name: '不显示首列',
          component: IsShowFirstColumn,
          meta: { title: '不显示首列' }
        },
        {
          path: 'multiple',
          name: '多选',
          component: Multiple,
          meta: { title: '多选' }
        },
        {
          path: 'radio-pagination',
          name: '单选分页',
          component: RadioPagination,
          meta: { title: '单选分页' }
        },
        {
          path: 'multiple-pagination',
          name: '多选分页',
          component: MultiplePagination,
          meta: { title: '多选分页' }
        }
      ]
    }
  ]
}

export default commonRouter
